Skip to content

fix(helm): default discord.enabled to true when botToken is present#394

Merged
thepagent merged 1 commit intoopenabdev:mainfrom
thepagent:fix/helm-discord-enabled-default
Apr 16, 2026
Merged

fix(helm): default discord.enabled to true when botToken is present#394
thepagent merged 1 commit intoopenabdev:mainfrom
thepagent:fix/helm-discord-enabled-default

Conversation

@thepagent
Copy link
Copy Markdown
Collaborator

Problem

Upgrading from 0.7.6 → 0.7.7-beta.1 causes CrashLoopBackOff because the new discord.enabled guard in configmap.yaml and secret.yaml requires the field to be explicitly set. Existing deployments from 0.7.6 don't have discord.enabled in their values, so the [discord] section and discord-bot-token secret entry are silently omitted.

Error: failed to parse /etc/openab/config.toml: missing field `discord`

Root Cause

The 0.7.7-beta.1 Slack adapter PR added this guard:

{{- if and ($cfg.discord).enabled ($cfg.discord).botToken }}

When discord.enabled is absent (not set), Go templates evaluate it as falsy → entire [discord] block is skipped.

Fix

Change the guard to only skip when enabled is explicitly "false":

{{- if and (ne (toString ($cfg.discord).enabled) "false") ($cfg.discord).botToken }}

This preserves backwards compatibility with 0.7.6 values (no enabled field) while still allowing explicit discord.enabled: false for Slack-only setups.

Verified

  • Tested locally: upgrade from 0.7.6 → 0.7.7-beta.1 with unmodified 0.7.6 values — pod starts, config.toml has [discord] section, secret has discord-bot-token.

Fixes #383

@github-actions
Copy link
Copy Markdown

⚠️ This PR is missing a Discord Discussion URL in the body.

All PRs must reference a prior Discord discussion to ensure community alignment before implementation.

Please edit the PR description to include a link like:

Discord Discussion URL: https://discord.com/channels/...

This PR will be automatically closed in 3 days if the link is not added.

@github-actions github-actions bot added the closing-soon PR missing Discord Discussion URL — will auto-close in 3 days label Apr 16, 2026
@thepagent thepagent force-pushed the fix/helm-discord-enabled-default branch 2 times, most recently from e9a91c7 to b476d8e Compare April 16, 2026 06:41
The 0.7.7-beta.1 chart added a discord.enabled guard but existing
deployments upgrading from 0.7.6 don't have this field set, causing
the [discord] section and discord-bot-token secret to be omitted
entirely — resulting in CrashLoopBackOff.

Change the guard from requiring enabled to be truthy to only skipping
when enabled is explicitly "false", preserving backwards compatibility.

Fixes openabdev#383
@thepagent thepagent force-pushed the fix/helm-discord-enabled-default branch from b476d8e to 5e4be98 Compare April 16, 2026 06:47
@thepagent thepagent enabled auto-merge (squash) April 16, 2026 06:49
@thepagent thepagent disabled auto-merge April 16, 2026 06:49
@thepagent thepagent merged commit a3c0cd0 into openabdev:main Apr 16, 2026
1 check passed
JARVIS-coding-Agent added a commit to JARVIS-coding-Agent/openab that referenced this pull request Apr 17, 2026
…nfigs

When upgrading from 0.7.6 to 0.7.7, per-agent discord configs that lack
the new discord.enabled field fail to render the [discord] TOML section,
causing pods to crash with 'no adapter configured'.

Replace the strict boolean check with a backward-compatible condition
that also considers the presence of botToken, matching the intent of openabdev#394.

Closes openabdev#416
JARVIS-coding-Agent added a commit to JARVIS-coding-Agent/openab that referenced this pull request Apr 17, 2026
…nfigs

When upgrading from 0.7.6 to 0.7.7, per-agent discord configs that lack
the new discord.enabled field fail to render the [discord] TOML section,
causing pods to crash with 'no adapter configured'.

Replace the strict boolean check with a backward-compatible condition
that also considers the presence of botToken, matching the intent of openabdev#394.

Closes openabdev#416
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

closing-soon PR missing Discord Discussion URL — will auto-close in 3 days

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Helm: discord.enabled not set on upgrade from 0.7.6 causes CrashLoopBackOff

2 participants